﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Webmedia.Wedding.Entities.Object.Restaurent;
namespace Webmedia.Wedding.Entities.Object.People
{
    [Table("NguoiDung")]
    public class NguoiDung
    {
        [Key]
        [Display(Name="Mã")]
        public int ID { get; set; }
           [Display(Name = "Tài khoản")]
        public string Username { get; set; }
           [Display(Name = "Họ và tên")]
        public string HoVaTen { get; set; }
           [Display(Name = "Giới tính")]
        public Nullable<bool> GioiTinh { get; set; }
           [Display(Name = "Ngày sinh")]
        public Nullable<DateTime> NgaySinh { get; set; }
            [Display(Name = "Địa chỉ")]
        public string DiaChi  { get; set; }
           [Display(Name = "Số điện thoại")]
        public string DienThoai { get; set; }
           [Display(Name = "Số CMND")]
        public string CMND { get; set; }
           [Display(Name = "Nơi cấp")]
        public string NoiCapCMND { get; set; }

        [Display(Name = "Ngày Cấp")]
        public Nullable<DateTime> IdentityDate { get; set; }//ngày cấp chứng minh nhân

        public Nullable<int> PhongBanID { get; set; }
        [ForeignKey("PhongBanID")]
        public virtual PhongBan PhongBan { get; set; }
        //Nhà Hàng
        public Nullable<int> NhaHangID { get; set; }
        
        [ForeignKey("NhaHangID")]
        public virtual Restaurent.NhaHang NhaHang { get; set; }


        [InverseProperty("NguoiTao")]
        public virtual ICollection<DichVu.DichVu> TaoDichVu { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<DichVu.DichVu> CapNhatDichVus { get; set; }


        [InverseProperty("NguoiTao")]
        public virtual ICollection<DichVu.BangGiaDichVu> TaoBangGiaDichVus { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<DichVu.BangGiaDichVu> CapNhatBangGiaDichVus { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<DichVu.LoaiDichVu> TaoLoaiDichVus { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<DichVu.LoaiDichVu> CapNhatLoaiDichVus { get; set; }

        //---------------------------------------------------------------------------

        [InverseProperty("NguoiTao")]
        public virtual ICollection<HoaDon.HoaDonKhachHang> TaoHoaDonKhachHangs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HoaDon.HoaDonKhachHang> CapNhatHoaDonKhachHangs { get; set; }

        [InverseProperty("NguoiThanhToan")]
        public virtual ICollection<HoaDon.HoaDonKhachHang> ThanhToanHoaDons { get; set; }


        [InverseProperty("NguoiTao")]
        public virtual ICollection<HoatDong.ChiPhiHoatDong> TaoChiPhiHoatDongs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HoatDong.ChiPhiHoatDong> CapNhatChiPhiHoatDongs { get; set; }

        //---------------------------------------------------------------------------

        [InverseProperty("NguoiTao")]
        public virtual ICollection<HoatDong.ChiPhiHoatDongNhaHang> TaoChiPhiHoatDongNhaHangs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HoatDong.ChiPhiHoatDongNhaHang> CapNhatChiPhiHoatDongNhaHangs { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<HoatDong.KhoanThuHoatDongNhaHang> TaoKhoanThuHoatDongNhaHangs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HoatDong.KhoanThuHoatDongNhaHang> CapNhatKhoanThuHoatDongNhaHangs { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<HoatDong.ThuHoatDong> TaoThuHoatDongs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HoatDong.ThuHoatDong> CapNhatThuHoatDongs { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<HopDong.ChiPhiHoatDongTiec> TaoChiPhiHoatDongTiecs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HopDong.ChiPhiHoatDongTiec> CapNhatChiPhiHoatDongTiecs { get; set; }

     

        [InverseProperty("NguoiTao")]
        public virtual ICollection<HopDong.HanMucBan> TaoHanMucBans { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HopDong.HanMucBan> CapNhatHanMucBans { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<HopDong.HopDong> TaoHopDongs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HopDong.HopDong> CapNhatHopDongs { get; set; }


        [InverseProperty("NguoiTao")]
        public virtual ICollection<HopDong.HopDong_ChiPhiHoatDong> TaoHopDong_ChiPhiHoatDongs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HopDong.HopDong_ChiPhiHoatDong> CapNhatHopDong_ChiPhiHoatDongs { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<HopDong.HopDong_DichVu> TaoHopDong_DichVus { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HopDong.HopDong_DichVu> CapNhatHopDong_DichVus { get; set; }
        //HopDong_SanPham
        [InverseProperty("NguoiTao")]
        public virtual ICollection<HopDong.HopDong_SanPham> TaoHopDong_SanPhams { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HopDong.HopDong_SanPham> CapNhatHopDong_SanPhams { get; set; }
        //
        [InverseProperty("NguoiTao")]
        public virtual ICollection<HopDong.HopDong_Sanh> TaoHopDong_Sanhs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HopDong.HopDong_Sanh> CapNhatHopDong_Sanhs { get; set; }
        //   [InverseProperty("NguoiTao")]
        public virtual ICollection<HopDong.HopDong_ThucDon> TaoHopDong_ThucDons { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<HopDong.HopDong_ThucDon> CapNhatHopDong_ThucDons { get; set; }
        //
      
        //   [InverseProperty("NguoiTao")]
          public virtual ICollection<HopDong.HopDong_TriAn> TaoHopDong_TriAns { get; set; }

        [InverseProperty("NguoiCapNhat")]
          public virtual ICollection<HopDong.HopDong_TriAn> CapNhatHopDong_TriAns { get; set; }
        //
        [InverseProperty("NguoiTao")]
        public virtual ICollection<NhaCungCap.NhaCungCap> TaoNhaCungCaps { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<NhaCungCap.NhaCungCap> CapNhatNhaCungCaps { get; set; }

            [InverseProperty("NguoiTao")]
        public virtual ICollection<MuaKinhDoanh.Mua> TaoMuas { get; set; }

        [InverseProperty("NguoiCapNhat")]
            public virtual ICollection<MuaKinhDoanh.Mua> CapNhatMuas { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<People.TraLuong> TaoTraLuongs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<People.TraLuong> CapNhatTraLuongs { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<Restaurent.BangGiaSanh> TaoBangGiaSanhs { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<Restaurent.BangGiaSanh> CapNhatBangGiaSanhs { get; set; }


        [InverseProperty("NguoiTao")]
        public virtual ICollection<Restaurent.PhieuNhapKho> TaoPhieuNhapKhos { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<Restaurent.PhieuNhapKho> CapNhatPhieuNhapKhos { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<SanPham.BangGiaSanPham> TaoBangGiaSanPhams { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<SanPham.BangGiaSanPham> CapNhatBangGiaSanPhams { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<SanPham.SanPham> TaoSanPhams { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<SanPham.SanPham> CapNhatSanPhams { get; set; }


        [InverseProperty("NguoiTao")]
        public virtual ICollection<ThucDon.ThucDon> TaoThucDons { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<ThucDon.ThucDon> CapNhatThucDons { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<ThucDon.BangGiaMonAn> TaoBangGiaMonAns { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<ThucDon.BangGiaMonAn> CapNhatBangGiaMonAns { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<ThucDon.HangThucDon> TaoHangThucDons { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<ThucDon.HangThucDon> CapNhatHangThucDons { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<ThucDon.MonAn> TaoMonAns { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<ThucDon.MonAn> CapNhatMonAns { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<TriAn.BangGiaTriAn> TaoBangGiaTriAns { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<TriAn.BangGiaTriAn> CapNhatBangGiaTriAns { get; set; }

        [InverseProperty("NguoiTao")]
        public virtual ICollection<TriAn.DichVuTriAn> TaoDichVuTriAns { get; set; }

        [InverseProperty("NguoiCapNhat")]
        public virtual ICollection<TriAn.DichVuTriAn> CapNhatDichVuTriAns { get; set; }

        //----------chi phi hoat dong
        [InverseProperty("NguoiDuyet")]
        public virtual ICollection<HoatDong.ChiPhiHoatDongNhaHang> DuyetChiPhiHoatDongs { get; set; }

        [InverseProperty("NguoiDuocGiao")]
        public virtual ICollection<HoatDong.ChiPhiHoatDongNhaHang> DuocGiaoChiPhiHoatDongs { get; set; }
        
        //-----------khoan thu chi phi hoat dong

        [InverseProperty("NguoiDuyet")]
        public virtual ICollection<HoatDong.KhoanThuHoatDongNhaHang> DuyetKhoanThuHoatDongs { get; set; }
        // duye trong tiec
        [InverseProperty("NguoiDuyet")]
        public virtual ICollection<HopDong.HopDong_ChiPhiHoatDong> DuyetHopDong_ChiPhiHoatDongTiecs { get; set; }
        //-----------duyet nhap kho

        [InverseProperty("NguoiDuyet")]
        public virtual ICollection<Restaurent.PhieuNhapKho> DuyetNhapKhos { get; set; }

        [InverseProperty("NguoiDuyet")]
        public virtual ICollection<People.TraLuong> DuyetTraLuongs { get; set; }

        [InverseProperty("NguoiDuocGiao")]
        public virtual ICollection<HopDong.HopDong_ChiPhiHoatDong> DuocGiaoChiPhiHoatDongTiecs { get; set; }

    }


}
